<?php
declare(strict_types=1);

namespace SixShop\Message\Controller\Admin;

use app\admin\controller\Base;
use SixShop\Message\Model\AnnouncementModel;
use SixShop\Message\Model\NotificationModel;
use SixShop\Message\Model\PrivateMessageModel;
use SixShop\Message\Model\MessageSettingModel;
use SixShop\Message\Model\MessageTemplateModel;

/**
 * 消息模块后台控制器基类
 */
class BaseController extends Base
{
    /**
     * @var AnnouncementModel
     */
    protected $announcementModel;
    
    /**
     * @var NotificationModel
     */
    protected $notificationModel;
    
    /**
     * @var PrivateMessageModel
     */
    protected $privateMessageModel;
    
    /**
     * @var MessageSettingModel
     */
    protected $messageSettingModel;
    
    /**
     * @var MessageTemplateModel
     */
    protected $messageTemplateModel;
    
    /**
     * 初始化
     */
    public function initialize()
    {
        parent::initialize();
        
        $this->announcementModel = new AnnouncementModel();
        $this->notificationModel = new NotificationModel();
        $this->privateMessageModel = new PrivateMessageModel();
        $this->messageSettingModel = new MessageSettingModel();
        $this->messageTemplateModel = new MessageTemplateModel();
    }
}
